#ifndef __GAMEMAIN_INCLUDE__
#define __GAMEMAIN_INCLUDE__

class CGameInfo;
class CGameEngine;

class CGameApp
{
	friend class CGameAppFrameListener;
public:
	static CGameApp* Singleton();

	CGameApp();
	virtual ~CGameApp();

	virtual const char* getGameName() = NULL;

	bool init();
	void fini();

	CGameInfo* getGameInfo() { return mGameInfo; }
	CGameInfo* setGameInfo(CGameInfo* game);

protected:
	virtual void initResource();
	virtual void onEngineInited();

protected:
	CGameInfo* mGameInfo;
	CGameEngine* mGameEngine;
};

#endif // __GAMEMAIN_INCLUDE__
